﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityModel
{
    /// <summary>
    /// 登录用户信息
    /// </summary>
    public class EGS_Account
    {
        public EGS_Account()
        {
            this.ID = Guid.NewGuid();
        }
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid ID { get; set; }
        /// <summary>
        /// 登录账号
        /// </summary>
        [MinLength(8)]
        [MaxLength(16)]
        [Required]
        public string? Account { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [MinLength(8)]
        [MaxLength(16)]
        [Required]
        public string? Password { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        [StringLength(20)]
        public string? PhoneNumber { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [StringLength(50)]
        public string? Email { get; set; }
        public DateTime DateTime { get; set; }
        public ICollection<EGS_User>? User{ get; set; }
    }
}
